home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-29 | 2.7 KB | 56 lines | [TEXT/ttxt] |
- Subject: Update: Progress CDEFs 1.3 (CDEF, TC source, test app)
- Newsgroups: alt.sources.mac
-
- This is an update to my "Progress Bar CDEF" I posted a couple days
- ago. The demo application (included) shows a horizontal progress
- bar, a verical progress bar that looks like a thermometer, and a
- progress arc, so you can "dare to be different". :-)
-
- Attached is a compressed archive which contains the following:
-
- . Progress Bar CDEF v1.3, THINK C source, TC7 project file
- . Progress Arc CDEF v1.3, THINK C source, TC7 project file
- . Demo application, THINK C source, resource file, TC7 project file
-
- (If you have an older version of TC, you can create the project files
- *easily*. For the demo application, just create a standard project with
- MacTraps and Progress Tester.c. For Progress Bar, create a new project,
- add MacTraps and Progress Bar CDEF.c, then "Set Project Type..." to
- "Code Resource", name "Progress Bar CDEF", type "CDEF", ID "600",
- Attrs of "20", file type "RSRC" and creator "RSED". Do the same for
- Progress Arc, except change the name to "Progress Arc CDEF" and the
- ID to "601".)
-
- These CDEFs allow your app to provide a progress indicator by simply
- adding a "CNTL" item to any dialog, and then calling SetCtlValue()
- from your program. It has a bonus feature: if the CNTL's variation
- code is "1", then the custom colors in the CNTL's corresponding 'cctb'
- resource are used to draw the frame/"done"/"to do" areas. If the
- variation code is "0", the standard "Finder progress bar" colors are
- used. (This is described in the source file in a little more detail.)
-
- The color progress bars should work just fine on Color QuickDraw Macs
- in 1-bit mode. (See the comments in the source for more details. :-)
-
- Changes since the 1.2 release on March 17, 1994:
-
- . RGBForeColor/RGBBackColor can move memory; copy colors from the
- AuxCtlTtable to temporary variables to prevent the overhead of
- HLock/HUnlock.
- . A white bar would show up between the "done" and "to do" parts
- if you never called SetCtlValue(); this has been fixed.
- . Added code to ensure the control is never outside the specified
- control min/max. This is done automatically by SetCtlValue, but
- it IS possible to set the control value without calling SetCtlValue
- so it was added for robustness.
- . Bumped the Progress Arc version up to 1.3 to correspond with the
- Progress Bar version.
-
- E-mail comments, suggestions, requests to: egurney@vcd.hp.com
-
- --
- Eddy J. Gurney N8FPW Hewlett-Packard Company, Vancouver (USA!) Division
- egurney@vcd.hp.com #include <standard-disclaimer.h>
- "Failures are divided into two classes-- those who thought and never did,
- and those who did and never thought." John Charles Salak
-